package demo7;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Demo {
    public static void main(String[] args) {
        System.out.println("容器初始化中");
        AnnotationConfigApplicationContext context =new AnnotationConfigApplicationContext("demo7");
        System.out.println("容器初始化结束");
        Person person= context.getBean(Person.class);
        person.play();
        context.close();
        System.out.println("使用new的方式初始化--------------------------------");
        Person p1 =new Person();




    }
}
